﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace Quanlyshopcd.GUI
{
    public partial class Quanlyshopcd : Form
    {
        BL.cl_thuedia cl;
        public Quanlyshopcd()
        {
            InitializeComponent();
        }

        private void Quanlyshopcd_Load(object sender, EventArgs e)
        {
            cl = new BL.cl_thuedia(this);
            cl.Load_makh();
            cl.Load_macd();
            cl.Load_dgv();
            cl.Show();
        }

        private void btn_add_Click(object sender, EventArgs e)
        {
            cl.Add();
        }

        private void dgv_thuecd_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            cl.Show();
        }

        private void btn_delete_Click(object sender, EventArgs e)
        {
            cl.Delete();
            cl.Load_dgv();
        }

        private void btn_cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btn_update_Click(object sender, EventArgs e)
        {
            cl.Update();
            cl.Load_dgv();
        }
    }
}
